class AppError extends Error {
  constructor(message, statusCode, errorType, logLevel = 'error') {
    super(message);
    this.statusCode = statusCode;
    this.errorType = errorType;
    this.logLevel = logLevel;
    this.isOperational = true;
    Error.captureStackTrace(this, this.constructor);
  }
}

export default AppError;